﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Uniriotec.DC.CoordDist.Base
{
    
    public class Message
    {
        #region Private fields

        private int time;
        private int procId;
        private string text;

        #endregion

        #region Properties

        public int ProcId
        {
            get { return procId; }
            set { procId = value; }
        }

        public int Time
        {
            get { return time; }
            set { time = value; }
        }

        public string Text
        {
            get { return text; }
            set { text = value; }
        }

        #endregion

        #region Constructors

        internal Message(int procId, int time, string text)
        {
            this.procId = procId;
            this.time = time;
            this.text = text;
        }

        public Message(int procId, string text) 
        {
            this.procId = procId;
            this.time = -1;
            this.text = text;
        }

        #endregion

        #region Overriden Methods

        public override string ToString()
        {
            return procId + "|" + time + "|" + text;
        }

        #endregion
    }
}
